package cn.juque.systemservice.api.dto.menu;

import cn.juque.common.abstracts.AbstractRequestDTO;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author JUQUE
 * @version 1.0.0
 * <ul>
 *  <li>simple-generator</li>
 *  <li>菜单</li>
 * </ul>
 * @date 2023-01-06 15:09:48
 **/
@Data
public class MenuInfoUpdateDTO extends AbstractRequestDTO {

    /**
     * 菜单ID
     */
    @NotEmpty(message = "菜单ID不能为空")
    @Size(message = "菜单ID不能超过{max}个字符", max = 32)
    private String menuId;

    /**
     * 菜单名称
     */
    @NotEmpty(message = "菜单名称不能为空")
    @Size(message = "菜单名称不能超过{max}个字符", max = 100)
    private String menuName;

    /**
     * 上级菜单ID
     */
    @Size(message = "上级菜单ID不能超过{max}个字符", max = 32)
    private String parentMenuId;

    /**
     * 权限标识
     */
    @Size(message = "权限标识不能超过{max}个字符", max = 255)
    private String permission;

    /**
     * 菜单类型
     */
    @Size(message = "菜单类型不能超过{max}个字符", max = 32)
    private String menuType;

    /**
     * 组件路径
     */
    @Size(message = "组件路径不能超过{max}个字符", max = 64)
    private String componentPath;

    /**
     * 排序号
     */
    @NotNull(message = "排序号不能为空")
    @Range(min = 0, max = 9999, message = "排序号必须在{min}-{max}之间")
    private Integer sortNo;

    /**
     * 备注
     */
    @Size(message = "备注不能超过{max}个字符", max = 400)
    private String remark;

}
